---
title: "Dashboard"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
source_code: embed
---
```{r setup, include=FALSE}
library(flexdashboard)
library(tidyverse)
library(p8105.datasets)
library(plotly)
data("nyc_airbnb")
nyc_airbnb =
nyc_airbnb %>%
mutate(stars = review_scores_location / 2) %>%
select(
neighbourhood_group, neighbourhood, stars, price, room_type, lat, long) %>%
filter(
neighbourhood_group == "Manhattan",
room_type == "Entire home/apt",
price %in% 100:500) %>%
drop_na(stars)
```
Column {data-width=650}
-----------------------------------------------------------------------
### Chart A
```{r}
nyc_airbnb %>%
mutate(text_label = str_c("Price: $", price, "\nStars: ", stars)) %>%
plot_ly(
x = ~lat, y = ~long, type = "scatter", mode = "markers",
color = ~price, text = ~text_label, alpha = 0.5)
```
Column {data-width=350}
-----------------------------------------------------------------------
### Chart B
```{r}
```
### Chart C
```{r}
```